package com.weirong.smartvault.dao;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import com.weirong.smartvault.entity.Command;

import java.util.Date;
import java.util.List;

@Repository
@Qualifier("commandRepository")
public interface CommandRepository extends JpaRepository<Command, Integer> ,JpaSpecificationExecutor<Command>{

    List<Command> findByCreatedTimeBetween(Date start, Date end);

    List<Command> findAllByRequestId(Integer id);
}
